//
//  SYDNetwork.h
//  PinGJByOwnerSide
//
//  Created by lantaiyuan on 2017/8/5.
//  Copyright © 2017年 lantaiyuan. All rights reserved.
//

#import <AFNetworking/AFNetworking.h>

@interface SYDNetwork : AFHTTPSessionManager
/**
 单例入口
 */
+ (instancetype)shareTool;

#pragma mark---个人中心

/**
 意见反馈
 @param cityCode 城市编码
 @param contactChannel 联系方式
 @param problemType 问题属性
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)getMineSuggestAdditionWithCityCode:(NSString *)cityCode contactChannel:(NSString *)contactChannel feedbackContent:(NSString *)feedbackContent problemType:(NSString *)problemType userId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 提现
 @param cityCode 城市编码
 @param amount 提现金额
 @param bankCard 银行卡号码
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)getMineCashingAdditionWithCityCode:(NSString *)cityCode
                                   amount:(NSString *)amount
                                 bankCard:(NSString *)bankCard
                                   userId:(NSString *)userId
                                  success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 获取提现详情
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)getMineCashingDetailAdditionWithuserId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 根据userId查询我的钱包明细
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)getMineWalletDetailWithuserId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 根据userId获取个人账号信息
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)getMineAcountWithUserId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 根据userId获取个人资料
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)getMineMaterialWithUserId:(NSString *)userId cityCode:(NSString *)cityCode success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 根据userId获取我的行程
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)getMyTrailOrderWithUserId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 根据userId获取我的车辆
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)getMineBusIfonWithUserId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 根据userId获取我的钱包
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)getMineWalletWithUserId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 行程轨迹
 @param orderNo 顺风车订单号
 @param success 成功
 @param failure 失败
 */
-(void)getMyTrailDetailWithOrderNo:(NSString *)orderNo success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 设置或重置支付密码
 @param cityCode 城市编码
 @param payCode 支付密码
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)setPayCodeAccountWithCityCode:(NSString *)cityCode payCode:(NSString *)payCode userId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 重置登录密码
 @param cityCode 城市编码
 @param password 登录密码
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)SetMineAccountPwdWithCityCode:(NSString *)cityCode oldPwd:(NSString *)oldPwd password:(NSString *)password userId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/*
  校验支付密码的正确性
 */
-(void)paycodeValidationWithCityCode:(NSString *)cityCode
                             payCode:(NSString *)payCode
                              userId:(NSString *)userId
                             success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                             failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

#pragma mark---杨阳 stat/curday/statline/{userId}

/**
 成绩统计
 @param success 成功
 @param failure 失败
 */
-(void)getHomeTodayDataSuccess:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;


/**
 消息通知
 @param cityCode 城市编码
 @param success 成功
 @param failure 失败
 */
-(void)GetHomePageMsgWithCityCode:(NSString *)cityCode success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 校验支付密码的正确性
 @param cityCode 城市编码
 @param payCode 支付密码
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)CheckPayCodeValidationWithCityCode:(NSString *)cityCode payCode:(NSString *)payCode userId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;
#pragma mark---三冰

/**
 用户登录
 @param password 密码
 @param username 用户名
 @param success 成功
 @param failure 失败
 */
-(void)UserLoginWithPassword:(NSString *)password username:(NSString *)username success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 忘记密码
 @param password 密码
 @param username 账号
 @param smsCode 验证码
 @param success 成功
 @param failure 失败
 */
-(void)RetrievePasswordWithPassword:(NSString *)password username:(NSString *)username smsCode:(NSString *)smsCode success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;
/**
 获取短信码 ---唯一码，86720029 - 注册短信码 ，86730019 - 忘记登录密码短信码 ，86630023 - 修改支付密码短信码 （对应阿里云上消息服务短信模板数字部分）
 @param mobilePhone 电话号码
 @param smsType 验证码
 @param success 成功
 @param failure 失败
 */
-(void)getSmsCodeWithMobilePhone:(NSString *)mobilePhone smsType:(NSString *)smsType success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;
/*
 账户注册
 */
-(void)userRegisterWithSMSCode:(NSString *)SMSCode username:(NSString *)username password:(NSString *)password success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;
/*
 注册详情步骤---身份信息 驾驶证信息  行驶证信息  车辆信息
 */
-(void)userInfoRegisterWithRegisterStep:(NSString *)registerStep realName:(NSString *)realName cardId:(NSString*)cardId iconUrl:(NSString *)iconUrl IDPhotoFrontUrl:(NSString *)IDPhotoFrontUrl IDPhotoBackUrl:(NSString *)IDPhotoBackUrl busBrand:(NSString *)busBrand busLicensePlate:(NSString *)busLicensePlate busOwner:(NSString *)busOwner carPhotoUrl:(NSString *)carPhotoUrl cityBelong:(NSString *)cityBelong cityCode:(NSString *)cityCode firmBelong:(NSString *)firmBelong passengerCountPermitted:(NSString *)passengerCountPermitted drivingLicenceStartTime:(NSString *)drivingLicenceStartTime drivinglicenceBackUrl:(NSString *)drivinglicenceBackUrl drivinglicenceFrontUrl:(NSString *)drivinglicenceFrontUrl runningLicenceRegisterTime:(NSString *)runningLicenceRegisterTime runningLicenceBackUrl:(NSString *)runningLicenceBackUrl runningLicenceFrontUrl:(NSString *)runningLicenceFrontUrl userId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;
/**单张表单上传图片--附件上传 */
- (void)uploadMultipartFilesWithParameters:(NSDictionary *)parameters
                                  mFile:(NSString *)mFile
                              uploadData:(NSData *)uploadData
                                success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                                failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

// 上传多张图片
-(void)uploadMostMultipartFilesWithParameters:(id)parameters
                                        mFile:(NSString *)mFile
                                  uploadDatas:(NSArray *)uploadDatas
                                      success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                                      failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/* 获取短信验证码(忘记密码) */
- (void)getLoginSmsCodeWithMobilePhone:(NSString *)mobilePhone
                              success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                              failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;
/* 获取注册短信验证码 */
- (void)getRegisterSmsCodeWithMobilePhone:(NSString *)mobilePhone
                                  success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                                  failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;
/*
 获取注册短信验证码
 */
-(void)getLoginSmsCodeWithMobilePhone:(NSString *)mobilePhone
                              smsType:(NSString *)smsType
                              success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                              failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 get pay sms code
 @param mobile mobile
 */
- (void)getPaySmsCodeWithMobile:(NSString *)mobile
                        success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                        failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

/**
 varification pay sms code
 @param mobile mobile
 @param sms sms code
 */
- (void)verificationPaySmsWithMobile:(NSString *)mobile
                                 sms:(NSString *)sms
                             success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                             failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;
/*
 更改车主当前状态
 */
-(void)changeBusOwnerStatusWithCityCode:(NSString *)cityCode
                                 status:(NSString *)status
                                 userId:(NSString *)userId success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                                failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;


/**
 根据用户Id获取车主最近一次接单号
 */
-(void)getOrderSuccess:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;

#pragma mark---城市选择
/**
 获取已开通城市列表(备选城市)
 
 @param success 成功
 @param failure 失败
 */
- (void)getCityListWithVersion:(NSString *)version success:(void (^)(NSURLSessionDataTask *task, id responseObject))success failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;



/**
 去接乘客-开始行程
 @param cityCode 城市编码
 @param lat 车辆纬度
 @param lon 车辆经度
 @param orderNo 顺风车订单号
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)startJourneyWithCityCode:(NSString *)cityCode
                                                       lat:(NSString *)lat
                                                       lon:(NSString *)lon
                                                   orderNo:(NSString *)orderNo
                                                    userId:(NSString *)userId
                                                   success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                                                   failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;


/**
 去接乘客-结束行程
 @param cityCode 城市编码
 @param lat 车辆纬度
 @param lon 车辆经度
 @param orderNo 顺风车订单号
 @param userId 用户id
 @param success 成功
 @param failure 失败
 */
-(void)endJourneyWithCityCode:(NSString *)cityCode
                                                       lat:(NSString *)lat
                                                       lon:(NSString *)lon
                                                   orderNo:(NSString *)orderNo
                                                    userId:(NSString *)userId
                                                   success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                                                   failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;


/**
 去接乘客-确定完成行程
 @param success 成功
 @param failure 失败
 */
-(void)confirmEndingJourneySuccess:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                           failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;


/**
 去接乘客-线路详情
 @param orderNo 顺风车订单号
 @param success 成功
 @param failure 失败
 */
-(void)GetHomepagePickUpPassengersRouteDetailWithorderNo:(NSString *)orderNo
                                                 success:(void (^)(NSURLSessionDataTask *task, id responseObject))success
                                                 failure:(void (^)(NSURLSessionDataTask *task, NSError *error))failure;
@end
